Introducing Corel WEB.DATA

Corel WEB.DATA is a  powerful data publishing tool that allows you to extract, organize, and publish large quantities of data from multiple databases. Whether you are an experienced database publisher or a novice user, Corel WEB.DATA displays your information in easily comprehensible formats, allowing you to produce appealing, professional documents within a structured and manageable environment. More importantly, Corel WEB.DATA allows you to publish your data to the World Wide Web.

Corel WEB.DATA combines the familiarity of database publishing with the advanced operations of Web authoring to enhance the display of your data on the World Wide Web. This tutorial provides you with hands-on database publishing experience and demonstrates how easy it is to master Corel WEB.DATA's advanced features.

Because Corel WEB.DATA runs under the Microsoft Windows operating system, you should familiarize yourself with basic Windows skills, e.g., opening and closing windows and using a mouse, before you attempt to complete the procedures in this tutorial. For information about Windows, see the Basic Skills section of the Microsoft Windows User's Guide.


Corel WEB.DATA controls
Corel WEB.DATA process

All Corel WEB.DATA projects are based on files called recipes. Recipes contain the instructions required for setting up the database publishing process and automate complex publishing tasks by reprocessing existing instructions.

To build a standard Corel WEB.DATA recipe, you must complete the four mandatory steps displayed on the main application screen: Select Database, Publishing Options, Field Selection, and Output setup. With these steps, you can select and format the database information that will be displayed by your document. For additional formatting and customizing, Corel WEB.DATA offers four optional steps: Record Selection, Record Sorting, Field Attributes, and Global Attributes.

When you launch Corel WEB.DATA, the first mandatory step on the main application screen, Select Database, is enabled. As you complete each step in the recipe-building process, Corel WEB.DATA marks your progress by adding color to the buttons that you have finished. An arrow to the left of the recipe buttons shows the next mandatory step in the process. To perform an optional step or revise a step in the recipe, click the appropriate icon and modify the options in the corresponding dialog box.

Because the information contained in your database may change frequently, Corel WEB.DATA makes it easy to update published files using recipes. When information in a database changes, simply run the recipe to create a new, updated Web document. Whether your document is a daily or weekly report, stock or mutual fund report, real estate listing, or telephone book, you can publish updated versions as often as you want using Corel WEB.DATA recipes.

 Tip

•	For additional assistance at any point in the recipe-creation process, consult Corel WEB.DATA's What's This Help or click F1 to access the main Corel WEB.DATA Help file.


Before you get started

To successfully complete the Corel WEB.DATA tutorial, you must have access to the application's sample files. If you chose not to copy these files when you installed the entire Corel WEB.DATA application, you must install the appropriate files and folders now.

If you installed Corel WEB.DATA to the default folder location, (C:\COREL\WEBMSTR), the sample files required for building the tutorial recipes were copied to the following folders:

Recipe files	C:\COREL\WEBMSTR\CWDATA\PROJECT\RECIPES
Database files	C:\COREL\WEBMSTR\CWDATA\PROJECT\DATA
Graphics files	C:\COREL\WEBMSTR\CWDATA\PROJECT\DOCS
 Notes

•	If you installed the Corel WEB.DATA application to a directory other than the default, the locations of the sample files will vary.

•	RecipeRecipe@cwdata.hlp files store the customizing and formatting instructions for your database publishing project.


Using the lessons

The lessons presented in this tutorial guide you through the development of some standard Corel WEB.DATA recipes. By the end of this tutorial, you will have created an online catalog in tabular format, complete with hyperlinks and a Substitution dictionary.

Lesson 1: Creating a custom online catalog

Lesson 1 guides you through the creation of a simple online catalog, introducing you to the main Corel WEB.DATA screen and the recipe building procedure.

Lesson 2 : Creating a table-based online catalog

In Lesson 2, you will apply table formatting to an online catalog of CDHome titles.

Lesson 3 : Advanced catalog creation

Lesson 3 builds on the skills explored throughout Lesson 2, allowing you to add hyperlinks to text, join databases, and create substitution dictionaries.

 Tip

•	Lesson 3 may also be completed using a preset Corel WEB.DATA sample recipe from the Recipes folder in your install folder.


Lesson 1: Creating a custom online catalog

Catalogs display large quantities of information in an easily comprehensible format, and Web catalogs make these large quantities of information available to a global audience. In this lesson, you will create a World Wide Web catalog of roses. Your rose catalog will contain the name, a graphic, and a brief description of each bloom. In Lesson 1, you will

•	create a new recipe

•	specify a database to publish to the World Wide Web

•	choose publishing options

•	sort records

•	select the fields to be published

•	define attributes for text fields

•	define field attributes for a graphics file

•	define attributes for numeric fields

•	define global attributes

•	choose the output setup and process your .HTML file

•	create hyperlinks

•	view your document on the World Wide Web


Contents

Imagine that you own a nursery specializing in roses. In an effort to increase your profits and target a larger audience, you decide to publish a catalog of your rarest blooms on the World Wide Web. To accomplish this task, you must complete the following procedures:

•	Creating a new recipe

•	Choosing your data source

•	Setting the publishing options

•	Sorting your records

•	Choosing your fields

•	Arranging your fields

•	Assigning the attributes to text fields

•	Assigning the HTML markup for t0.R_TITLE

•	Assigning the HTML markup for t0.HEIGHT

•	Assigning the HTML markup for t0.COLOR

•	Assigning the HTML markup for t0.FRAGRANCE

•	Assigning the HTML markup for t0.DESCRIPT

•	Assigning the HTML markup for t0.NR_R

•	Assigning the field attributes to a graphics file

•	Positioning the graphic

•	Assigning field attributes to a numeric field

•	Setting the global attributes

•	Setting up the output

•	Saving your recipe

•	Processing the recipe

•	Testing the recipe

•	Changing the number of records

•	Adding a hyperlink

•	Adding a calculated field

•	Positioning your calculated field

•	Completing the HTML markup

•	Testing the hyperlink


Creating the new recipe file
Creating a new recipe file

When you installed Corel WEB.DATA, a sample recipe for the rose catalog, named ROSE.RCP, was copied to the RECIPE folder in your install folder. ROSE.RCP provides you with a sample of the rose catalog recipe that you will create in this lesson.

When you create and save your new catalog recipe, you must choose a filename other than ROSE.RCP. If you specify ROSE.RCP as your catalog recipe name, you will overwrite the sample when you save your file. In this procedure you will create a new recipe.

To create a new recipe file

1.	Click File, New.

2.	Click File, Save As.

3.	Locate the RECIPES subfolder in your Corel WEB.DATA install folder.

4.	Type "SAMPLE1" in the File Name box.

5.	Click Save.

 Tip

•	You can also click [image] to save your recipe.


Choosing your data source

When you launch Corel WEB.DATA, an arrow appears to the left of the Select Database button, marking the first mandatory step in the recipe-building process. The database containing the rose information that you require for this procedure is stored in dBASE format under the filename ROSE.DBF. In this procedure, you will choose your data source.

To choose your data source

1.	Click the Select Database button [image].

2.	In the Select Database dialog box, click the Browse button.

3.	Ensure that dBASE 5.0 (*.DBF) is selected in the Files Of Type list box.

4.	Select ROSE.DBF in the DATA folder of your Corel WEB.DATA install folder.

5.	Click Open.

Corel WEB.DATA returns to the Select Database dialog box.

6.	Click the Display button.

Corel WEB.DATA opens the Table View window and displays all of the data in the selected database.

7.	Click the Close All button [image].

Corel WEB.DATA returns to the Select Database dialog box.

8.	Click OK.

 Notes

•	When you use Corel WEB.DATA to publish information, you access the database fields and use their data without altering the data itself.

•	Corel WEB.DATA adds the prefix t0 to each field and the prefix tn (where n is an integer from 0 to 64) to each table and its fields. In this way, Corel WEB.DATA labels the main table with the prefix t0, the first joined table with the prefix t1, and so on. All field names contain the prefix that identifies their source tables.


Setting the publishing options

Because your catalog will be displayed on the World Wide Web, you must choose a Web browser and define an appropriate processing method for previewing your document. Since Web browsers vary in their display capabilities, you can customize your Corel WEB.DATA document to take advantage of your particular browser's functionality. In this procedure you will specify the publishing options for your rose catalog's recipe file.

To set the publishing options

1.	Click Publishing Options [image].

2.	In the Publishing Options dialog box, enable the HTML button.

3.	Ensure that Default is specified in the Browser list box.

3.	Ensure that Custom is specified in the Process Method list box.

4.	Click OK.

 Note

•	You can define a browser for previewing your catalog by clicking Publishing Options and choosing Microsoft, Netscape, or HotJava from the Browser list box. If you choose Default from the Browser list box, your Corel WEB.DATA catalog will be displayed by your system's default Web browser.


Sorting your records

In this procedure, you will specify the order in which Corel WEB.DATA displays the records in the database. The records for your rose catalog's recipe file will be sorted in ascending order according to title.

To sort your records

1.	Click the Record Sorting button [image].

2.	Choose t0.R_TITLE from the Available Fields list box in the Select Sort Fields dialog box.

3.	Click the Add Field button.

4.	Click the Display button.

Corel WEB.DATA opens the Table View window and displays the records sorted in alphabetical order.

5.	Click the Close All button [image].

Corel WEB.DATA returns to the Select Sort Fields dialog box.

6.	Click OK.


Selecting your fields

With Corel WEB.DATA, you can assign different fields to the heading control blocks and body block of your document. When you use Corel WEB.DATA to publish information, you access the database fields and use their data without altering the fields themselves. In this procedure, you will assign all fields to the document body.

To select fields

1.	Click the Field Selection button [image].

2.	Select Document Body in the Field Selection dialog box.

3.	Select all of the fields in the Available window.

4.	Click the Add Field(s) button.

 Tips

•	To select multiple items in a list, click the first item, hold down SHIFT, and click the last item.

•	To select several non-consecutive items, hold down CTRL, and click the items.


The Field Selection dialog box should look like this:


Arranging your fields

Corel WEB.DATA publishes the data from each selected field in the exact order that the fields appear in the Selected window. In this procedure, you will position the t0.DESCRIPT field between the t0.FRAGRANCE and t0.NR_R fields, by right clicking the field and using the commands in the pop-up menu, e.g., Cut and Paste.

To complete this procedure, you must have the Field Selection dialog box open.

To arrange fields

1.	Choose t0.DESCRIPT from the Selected window.

2.	Right-click and click Cut.

3.	Choose t0.NR_R from the Selected window.

4.	Right-click and click Paste Above.

5.	Click OK.


Assigning attributes to text fields

Corel WEB.DATA applies all formatting attributes and codes to your data when you publish your final HTML document. However, the actual data, as it appears in the database, retains its original structure and is not affected by Corel WEB.DATA's formatting codes. Instead, the formatting attributes and codes that you've applied to the database information are interpreted by the Web browser that displays your published, Web page.

In this procedure you will explore the options presented in the Field Attributes dialog box.

•	Click Field Attributes [image].

Corel WEB.DATA opens the Field Attributes dialog box.

The Fields list box borders the Field Attributes dialog box and displays the fields that you assigned to the document body control block in the Field Selection dialog box. The list box in the Fields dialog box displays the parts or blocks of your document that you have assigned fields to in the Field Selection dialog box. The scrolling window in the Fields dialog box displays the fields that correspond to your selection in the list box. Because you have assigned all of the selected fields for your SAMPLE1.RCP recipe to the body of your document, the list box in the Fields dialog box displays the Document Body heading. All fields that have been assigned to the body of your Web page are featured in the scrolling window of the Fields dialog box. To format the individual fields that will be displayed in the body of your final Web document, you must first make selections in the Fields list box.

The Tags dialog box allows you to assign HTML tags to the selected fields in your custom processed documents. When you assign a tag to a field, Corel WEB.DATA formats the data in that field according to the assigned attributes. If you publish your document in table-format, Corel WEB.DATA does not display the Tags dialog box.

To create your rose catalog recipe  using Corel WEB.DATA, you will format data by inserting macros in the Text Before and Text After boxes. When you add macros to the Text Before box, you instruct Corel WEB.DATA to begin formatting text. The formatting continues until you type an ending macro in the Text After box.

In the following procedures, you will learn how to enter macros to define the font size, color, and field positions for text and graphics files. You will also use macros to insert line breaks and other graphics in your text and graphics files.


Assigning the HTML markup for t0.R_TITLE

The first field referenced in your recipe, t0.R_TITLE, will contain formatting tags that instruct your Web browser to display your title in italics, with red coloring and a font size of seven. You will also format the field to insert a horizontal rule above each title. In this procedure, you will format the title information for each record in your recipe file.

To specify the HTML markup for t0.R_TITLE

1.	Click the Field Attributes button [image].

2.	Choose t0.R_TITLE from the list in the Fields dialog box.

3.	Type "{tag:var}{tag:hr}{tag:font size=7color=Red}" in the Text Before box.

4.	Type "{tag:/font}{tag:/var}" in the Text After box.

 Note

•	The horizontal rule tag, {tag:hr}, does not require an end tag.


The Field Attributes dialog box should look like this:


Assigning the HTML markup for t0.HEIGHT

In this procedure, you will instruct Corel WEB.DATA to format the t0.Height field. The font size that you specify will remain consistent for all of the fields that follow the t0.HEIGHT field, up to and including the t0FRAGRANCE field. To format the font size in this manner, you will not assign an end tag directly after the t0.HEIGHT field.

To complete this procedure, you must have the Field Attributes dialog box open. If you closed the Field Attributes dialog box in the previous procedure, click the Field Attributes button to re-open this dialog box.

To specify the HTML markup for t0.HEIGHT

1.	Choose t0.HEIGHT from the list in the Fields dialog box.

2.	Type "{tag:font size=3}Height:" and press the SPACEBAR in the Text Before box.

3.	Type "{tag:BR}" in the Text After box.


The Field Attributes dialog box should look like this:


Assigning the HTML markup for t0.COLOR

In this procedure you will instruct Corel WEB.DATA to format the fields from t0.COLOR up to and including t0.FRAGRANCE. Each field value should be prefaced with introductory text and separated with a soft line break.

To complete this procedure, you must have the Field Attributes dialog box open. If you closed the Field Attributes dialog box in the previous procedure, click the Field Attributes button to re-open this dialog box.

To specify the HTML markup for t0.COLOR

1.	Choose t0.COLOR from the list in the Fields dialog box.

2.	Type "Color:" and press SPACEBAR in the Text Before box.

3.	Type "{tag:BR}" in the Text After box.

Repeat the above procedure for the following fields:

Field	Text Before	Press	Text After
t0.BUDS	Buds:	SPACEBAR	{tag:BR}
t0.BLOOMS	Blooms:	SPACEBAR	{tag:BR}
t0.PETALS	Petals:	SPACEBAR	{tag:BR}
t0.STEMS	Stems:	SPACEBAR	{tag:BR}
t0.FOLIAGE	Foliage:	SPACEBAR	{tag:BR}


The Field Attributes dialog box should look like this:


Assigning the HTML markup for t0.FRAGRANCE

Because the t0.FRAGRANCE field is the last field in this section, you must insert a paragraph break to separate its data from the following field's information. In this procedure, you will insert a paragraph break by typing the "{tag:p}" code in the Text After box.

To complete this procedure, you must have the Field Attributes dialog box open. If you closed the Field Attributes dialog box in the previous procedure, click the Field Attributes button to re-open this dialog box.

To specify the HTML markup for t0.FRAGRANCE

1.	Choose t0.FRAGRANCE from the list in the Fields dialog box.

2.	Type "Fragrance:" and press SPACEBAR in the Text Before box.

3.	Type "{tag:/font}{tag:p}" in the Text After box.


The Field Attributes dialog box should look like this:


Assigning the HTML markup for t0.DESCRIPT

The t0.DESCRIPT field contains a brief description of each rose that will appear in your catalog. In this procedure, you will apply italics, font size, and paragraph tags to the data in the t0.DESCRIPT field.

To complete this procedure, you must have the Field Attributes dialog box open. If you closed the Field Attributes dialog box in the previous procedure, click the Field Attributes button to re-open this dialog box.

To specify the HTML markup for t0.DESCRIPT

1.	Choose t0.DESCRIPT from the list in the Fields dialog box.

2.	Type "{tag:em}{tag:font size=4}", press  SPACEBAR, type "-", and press the SPACEBAR again in the Text Before box.

3.	Type "{tag:/font}{tag:/em}{tag:p}" in the Text After box.


The Field Attributes dialog box should look like this:


Assigning the HTML markup for t0.NR_R

In this procedure, you will position the data contained in the t0.NR_R field to the right of the screen and apply the Bold formatting tag.

To complete this procedure, you must have the Field Attributes dialog box open. If you closed the Field Attributes dialog box in the previous procedure, click the Field Attributes button to re-open this dialog box.

To specify the HTML markup of rt0.NR_R

1.	Choose t0.NR_R from the list in the Fields dialog box.

2.	Type "{tag:div align=right}Price:", press SPACEBAR, and type "{tag:B}" in the Text Before box.

3.	Press the SPACEBAR, type "for", and press SPACEBAR again in the Text After box.

 Note

•	Because the bold format specified in the Text Before box also applies to the next field, you do not have to assign the closing Bold tag to the Text After box.


The Field Attributes dialog box should look like this:


Assigning the field attributes for a graphics file

In this procedure, you will assign attributes to a field that contains the names of files. You must indicate that the t0.IMAGE_NAME field references graphics files and specify the type of graphic, .GIF, in the Extension box.

To complete this procedure, you must have the Field Attributes dialog box open. If you closed the Field Attributes dialog box in the previous procedure, click the Field Attributes button to re-open this dialog box.

To specify the file type

1.	Choose t0.IMAGE_NAME from the list in the Fields dialog box.

2.	Choose File from the Change Field Type To list box.

3.	Click File Format.

4.	In the File Format dialog box, choose Graphic from the Options list box.

5.	Ensure that Normal is selected in the Type list box.

6.	Enable the URL button in the Location section.

7.	Ensure that Filename Only is selected in the Field Contents Contain list box.

This indicates that the t0.IMAGE_NAME field contains the names of graphics files and not the graphics themselves.

8.	Type "GIF" in the Extension box.

 Note

•	When you process your document, Corel WEB.DATA adds the contents of the graphics file referenced by this field.


The Field Attributes dialog box should look like this:


Positioning the graphic

Now that you’ve told Corel WEB.DATA that the IMAGE_NAME field references a graphics file, you must specify where Corel WEB.DATA will position the graphics in your document. In this procedure, you will format the vertical and horizontal alignment of the graphics files. Choosing Middle for the Vertical Alignment of the graphic, aligns the middle of the image with the text appearing on that line. Choosing At Cursor Position for the Horizontal Alignment value  treats the image as a character, placing it at the end of the text on that line.

To complete this procedure you must have the File Format dialog box open. If you closed the File Format dialog box in the previous procedure, click the Field Attributes button and then click the File Format button to re-open this dialog box.

To position a graphic

1.	Click Create Frame.

Corel WEB.DATA opens the Create Frame dialog box.

2.	Enable the Middle button from the Vertical Alignment section.

3.	Enable the At Cursor Position button in the Horizontal Alignment section.

4.	Click OK.

The red check mark beside the Create Frame button in the File Format dialog box indicates that you have specified frame settings.

5.	Click OK.

The red check mark beside the File Format button in the Field Attributes dialog box indicates that you have specified format options.


Assigning the field attributes to a numeric field

Now that you have assigned attributes to text fields and to a field containing references to graphics files, you must assign attributes to the field containing the numeric data for your catalog. In this procedure, you will format the numeric data contained in the t0.PRICE field.

To complete this procedure, you must have the Field Attributes dialog box open. If you closed the Field Attributes dialog box in the previous procedure, click the Field Attributes button to re-open this dialog box.

To set attributes for a numeric field

1.	Choose t0.PRICE from the list in the Fields dialog box.

2.	Type "{tag:/B}{tag:/div}{tag:BR}" in the Text After box.

3.	Click the Numeric Format button.

4.	In the Numeric Format dialog box, choose Currency in the Format section.

5.	Click OK.

The red check mark beside the Numeric Format button in the Field Attributes dialog box indicates that you have specified formatting for this option.

6.	Click OK.


Setting the global attributes

In this procedure, you will specify layout options for the entire document. Using the Global Attributes dialog box, you will give your document a title and color it green.

To set global attributes

1.	Click the Global Attributes button [image].

2.	Type "{title:Flowers}{tag:font size=7color=green}Beautiful Flowers{tag:/font}" in the Before First Record box.

3.	 Click OK.


Setting up the output

In this procedure you will specify the publishing process for the .HTML output file. Corel WEB.DATA allows you to simply process the output file or to process the output file and view it on the World Wide Web.

By default, Corel WEB.DATA assigns the database file name to the .HTML file. Because the sample files that you copied to your \DOCS folder  already contain an .HTML file named ROSE.HTM, you must change your file name to SAMPLE1.HTM.

To set up the output

1.	Click the Output Setup button [image].

2.	In the Output Setup dialog box, Type C:\COREL\WEBMSTR\CWDATA\PROJECT\DOCS\SAMPLE1.HTM in the Output File box.

3.	Click OK.

 Note

•	The path that you specify in the Output Setup dialog box may be different if you changed the Install directory for the Corel WebMaster Suite.


Saving your recipe

Before you process your recipe and view it on the World Wide Web, you must save the SAMPLE1.RCP recipe file.

To save a recipe

•	Click File, Save.


Processing the recipe

In this procedure, you will process the SAMPLE1.RCP recipe and view the HTML output file on the Web. The Records bar in the Processing Output dialog box indicates the number of records being processed and the progress that Corel WEB.DATA has made.

To process a recipe

1.	Click the Process button [image].

2.	In the Processing Output dialog box, click the Preview In Browser button.

Corel WEB.DATA launches your Web browser and opens the output file processed by the recipe.

 Notes

•	If you click the View In Text Editor button in the Processing Output dialog box, Corel WEB.DATA opens the text file containing the HTML code for your document in the Windows WordPad Editor.

•	Although you can view and edit HTML code in the WordPad Editor, we do not recommend altering your document unless you have previous experience with the Hypertext Markup Language (HTML).


Your Web document should look like this:


Testing your recipe

Before you publish your final HTML document, it’s a good idea to test your recipe by narrowing your record selection. By choosing a limited number of records, using the # Records setting in the Output Setup dialog box, you can quickly preview your document's formatting. In this procedure you will test the SAMPLE1.RCP recipe.

To limit the number of records published

1.	Close your browser window.

2.	Click the Output Setup button [image].

3.	Type 1 in the Start Record box of the Output Setup dialog box.

4.	Type 3 in the # Records box of the Output Setup dialog box.

5.	Click OK.

Corel WEB.DATA returns to the main application window.

6.	Click Process, Preview In Browser.

Corel WEB.DATA opens your Web browser and displays the first three entries of your Beautiful Flowers catalog.

7.	Close your browser window to continue.

 Tip

•	If you click the From Display button in the Output Setup dialog box, Corel WEB.DATA opens the Table View window, allowing you to view your data in tabular format. To change the initial record displayed in your document, click the row number that you want to use as your starting record and close the Table View window. Corel WEB.DATA displays the row number that you indicated in the Start Record box in the Output Setup dialog box.


Changing the number of records

Now that you have tested your recipe, you can change the value specified in the # Records box in the Output Setup dialog box. In this procedure you will enable the All Records check box to publish all of the records in your document, or modify the value to publish a different range of records.

To change the number of records published

1.	Click the Output Setup button [image].

2.	Edit the values in the Start Record and # Records boxes.

3.	Click OK.

4.	Click Process, Preview In Browser.

Corel WEB.DATA launches your Web browser and displays the specified entries of your Beautiful Flowers catalog.

5.	Close your browser window to continue.

To publish all records

1.	Click the Output Setup button [image].

2.	Enable the All Records check box.

3.	Click OK.

Corel WEB.DATA returns to the main application screen.

4.	Click Process, Preview In Browser.

Corel WEB.DATA launches your Web browser and displays the complete Beautiful Flowers catalog.

5.	Close your browser window to continue.


Adding a hyperlink

Corel WEB.DATA allows you to format the text and graphics in your documents as hyperlinks that jump to other text or graphics files (.GIF, .JPG). To create a hyperlink in Corel WEB.DATA, you must apply macro functions to a calculated field in your recipe file.

In the following procedures, you will format the graphics displayed in your Beautiful Flowers document as inline images that jump to larger, higher definition representations of  the original images. When you click the picture of any rose in your final Web document, your browser will load a larger picture of the specified flower.


Adding a calculated field

In these procedures, you will create a calculated field that references a graphics file. The values contained in the t0.IMAGE_NAME field, combined with the .JPG file extension automatically generate the graphics file name. You can also use Corel WEB.DATA's display feature to view the results in Table format.

To add a calculated field

1.	Click the Select Database button [image].

2.	Click the Add Joins And Calculated Fields button.

3.	Click the Calculated Field button.

4.	In the Calculated Field dialog box, type "HYPERLINK" in the Name box of the Field To Be Created section.

5.	Choose Text from the Type list box.

6.	Type "{tag:a href="+t0.IMAGE_NAME+".jpg}" in the Expression box.

Include the quotation marks that surround the text.

7.	Click OK.

To display your data in table format

1.	Click the Select Database button [image].

2.	Click the Display button in the Views section of the Table Join dialog box.

Corel WEB.DATA displays your data in table format, allowing you to view the data as it appears in the database.

3.	Click the Close All button [image].

Corel WEB.DATA returns to the Table Join dialog box.

4.	Click OK.

Corel WEB.DATA returns to the Select Database dialog box.

5.	Click OK.

 Notes

•	A calculated field stores data but remains external to the database and is not permanent. The values specified in the calculated fields of a document do not affect the information stored in the database.

•	The calculated field that you create for the SAMPLE1.RCP file is named HYPERLINK; however, the calculated field that corresponds to the sample ROSE.RCP file is named C1.CCC.


Positioning your calculated field

For Corel WEB.DATA to recognize the hyperlink formatting in your document, you must position the calculated field that references the hyperlink before the field that contains the actual hyperlinked text or object. In this procedure, you will position the calculated field that you have created above the t0.IMAGE_NAME field in the Field Selection dialog box.

To position a calculated field

1.	Click the Field Selection button [image].

2.	Choose t0.R_TITLE from the Selected window in the Field Selection dialog box.

3.	Choose C1.HYPERLINK from the Available window.

4.	Click the Add Field(s) button.

5.	Click OK.

 Tip

•	You can also right-click to copy the calculated field and paste it above the t0.IMAGE_NAME field.


Completing the HTML markup

To complete the HTML markup for your document, you must insert an end tag that closes the linked element. In this procedure, you will close the hyperlink that you opened when you created the calculated field.

1.	Click the Field Attributes button [image].

2.	Choose t0.IMAGE_NAME from the list in the Fields dialog box.

3.	Type "{tag:/a}{tag:BR}" in the Text After box.

4.	Click OK.


Saving your recipe

Before you process your recipe and view it on the World Wide Web, you must save the SAMPLE1.RCP file.

To save a recipe

•	Click File, Save.


Testing your hyperlink

Before you publish your final HTML document, it’s a good idea to test your recipe by reducing the number of records that you process at one time. In this procedure you will text your recipe by processing only the first three entries in your rose catalog.

1.	Click the Process button [image].

2.	In the Processing Output dialog box, click the Preview In Browser button.

Corel WEB.DATA opens your published document in your system's default Web browser. All images in your document are displayed with a highlighted border, indicating that they represent inline or hyperlinked images.

3.	Click any rose graphic.

A larger, high resolution image of the specified rose appears.

4.	Close your browser window to continue.


Reviewing your progress

Congratulations! You have successfully created a Corel WEB.DATA recipe file that determines how Corel WEB.DATA publishes your database information to the World Wide Web. You now have a recipe file that formats the layout of information from the database and an .HTML file that contains the information required by your browser to display your rose catalog on the World Wide Web.

Advance to Lesson 2 and continue exploring Corel WEB.DATA's publishing options by creating a table-based catalog of CD Home titles.


Lesson 2: Creating a table-based online catalog

In this lesson, you'll create a Web catalog displaying some of Corel's most popular CD Home titles. Your catalog will display the titles, a graphic, and a brief description of each CD in table format.

In Lesson 2 you will

•	create a recipe for a formatted table

•	use the information in a database field for several different purposes


Contents

Imagine that you have been contracted to create a catalog that features some of Corel's most popular CD Home titles. The catalog will list the CD titles, their logo, and a brief description of the CD contents. All catalog entries will be displayed in tabular format and the finished product will be published on the World Wide Web, making the information available to consumers around the world. To accomplish these tasks, you must complete the following procedures:

•	Creating a new Corel WEB.DATA recipe file

•	Selecting a database to display on the World Wide Web

•	Defining the publishing options

•	Selecting the fields

•	Setting the field attributes

•	Setting the field attributes for a graphics file

•	Setting the field attributes for a text file

•	Setting the global attributes and using macro functions

•	Defining the output for your published recipe

•	Saving your recipe

•	Processing your recipe file

When you've finished this lesson, you will have a recipe file containing the formatting information for your catalog and an .HTML file that can be displayed on the World Wide Web.


Creating the new recipe file
Creating a new recipe file

When you installed Corel WEB.DATA, a sample recipe for the CD Home catalog, named CDHOME.RCP, was copied to the RECIPE subfolder in your install folder. CDHOME.RCP provides you with a sample of the CD Home catalog recipe that you will create in this lesson.

When you create and save your new catalog recipe file, you must choose a filename other than CDHOME.RCP. If you specify CDHOME.RCP as your catalog recipe name, you will overwrite the original sample when you save your file. In this procedure, you will create a new recipe.

To create a new recipe file

1.	Click File, New.

2.	Click File, Save As.

3.	Locate the RECIPES folder in your Corel WEB.DATA install folder.

4.	Type "MYCDHOME" in the File Name box.

5.	Click Save.

 Tip

•	You can also click [image] to save your recipe.


Selecting the database
Selecting the database on the World Wide Web

When you launch Corel WEB.DATA, an arrow appears to the left of the Select Database button, marking the first mandatory step in the recipe building process. The database containing the CD Home information that you require for this procedure is stored in dBASE format under the filename CDHOME.DBF. In this procedure you will choose your data source.

To select a database

1.	Click the Select Database button [image].

2.	Click the Browse button in the Select Database dialog box.

3.	Ensure that dBASE 5.0 is selected in the Files Of Type list box.

4.	Select CDHOME.DBF in the DATA subfolder of your Corel WEB.DATA install folder.

5.	Click Open.

6.	Click OK.

 Notes

•	When you use Corel WEB.DATA to publish information, you access the database fields and use their data without altering the data itself.

•	Corel WEB.DATA adds the prefix t0 to each field and the prefix tn (where n is an integer from 0 to 64) to each table and its fields. In this way, Corel WEB.DATA labels the main table with the prefix t0, the first joined table with the prefix t1, and so on. All field names contain the prefix that identifies their source tables.


Setting the publishing options

Because your catalog will be displayed on the World Wide Web, you must choose a Web browser and define an appropriate processing method for previewing your document. Since Web browsers vary in their display capabilities, you can customize your Corel WEB.DATA document to take advantage of your particular browser's functionality. In this procedure you will specify the publishing options for your CD Home catalog's recipe file.

To set the publishing options

1.	Click Publishing Options [image].

2.	In the Publishing Options dialog box, enable the HTML button.

3.	Ensure that Default is selected in the Browser list box.

3.	Choose Table from the Process Method list box.

4.	Click OK.

 Note

•	You can define a browser for previewing your catalog by clicking Publishing Options and choosing Microsoft, Netscape, or HotJava from the Browser list box. If you choose Default from the Browser list box, your Corel WEB.DATA catalog will be displayed by your system's default Web browser.


Selecting the fields

With Corel WEB.DATA, you can assign different fields to the heading control blocks and body control block of your document. When you use Corel WEB.DATA to publish information, you access the database fields and use their data without altering the fields themselves. In this procedure, you will assign all fields to the document body.

To select fields

1.	Click the Field Selection button [image].

2.	Ensure that the Document Body is selected in the Field Selection dialog box.

3.	Choose t0.PRODUCT in the Available window.

4.	Click the Add Field(s) button.

5.	Choose t0.LOGO from the Available window.

6.	Click the Add Field(s) button.

7.	Repeat steps 5 and 6 to add t0.LOGO to the Selected window again.

8.	Click OK.

 Note

•	The t0.LOGO field will be used to reference the product's graphic file and text file.


Setting the field attributes

When you set field attributes in Corel WEB.DATA, you indicate how you would like to use the selected fields in your table. In this procedure you will not apply any formatting to the t0.PRODUCTS field.

To set field attributes

1.	Click the Field Attributes button [image].

2.	Choose t0.PRODUCT from the list in the Fields dialog box.

3.	Ensure that Text is selected in the Change Field Type To list box.


Setting the field attributes for a graphics file

In this procedure, you will assign attributes to a field that contains the names of graphics files. You must indicate that the t0.LOGO field references graphics files for your CD Home catalog and specify the type of graphic, .JPG, in the Extension box.

To complete this procedure, you must have the Field Attributes dialog box open. If you closed the Field Attributes dialog box in the previous procedure, click the Field Attributes button to re-open this dialog box.

To set field attributes for a graphics file

1.	Choose the first t0.LOGO in the list of the Fields dialog box.

2.	Choose File from the Change Field Type To list box.

3.	Click the File Format button.

4.	Choose Graphic from the Options list box in the File Format dialog box.

5.	Ensure that Normal is selected in the Type list box and that the URL button is enabled in the Location section.

6.	Ensure that Filename Only is selected in the Field Contents Contain list box.

7.	Type "JPG" in the Extension box.

8.	Leave the Path box empty.

The output file will be directed to the folder where the graphic files are stored. Your Web browser will search for the graphic files in the same folder as the output file.

9.	Click OK.


The Field Attributes dialog box should look like this:


Setting the field attributes for a text file

In this procedure, you will assign attributes to a field that contains the names of text files. You must indicate that the second t0.LOGO field references the text descriptions for your CD Home catalog and specify the type of file, .TXT, in the Extension box.

To complete this procedure, you must have the Field Attributes dialog box open. If you closed the Field Attributes dialog box in the previous procedure, click the Field Attributes button to re-open this dialog box.

To set the field attributes for a text file

1.	Choose the second t0.LOGO in the list of the Fields dialog box.

2.	Choose File from the Change Field Type To list box.

3.	Click the File Format button.

4.	Choose Binary from the Options list box in the File Format dialog box.

5.	Ensure that Filename Only is selected in the Field Contents Contain list box.

6.	Type "TXT" in the Extension box.

7.	Type a folder path leading to the DOCS folder in the Path box or click the Browse button to locate the folder on your local system A Corel WEB.DATA macro will automatically locate the file in the specified folder and will insert it’s contents in the output file.

8.	Click OK.

Corel WEB.DATA returns to the Field Attributes dialog box.

9.	Click OK.


The Field Attributes dialog box should look like this:


Setting the global attributes and using macro functions

In this procedure, you will specify layout options for the entire CD Home recipe. Using the Global Attributes dialog box, you can specify the title of your document, e.g., Corel CD Home Catalog and apply HTML tags that color it yellow and size it to seven.

To set global attributes

1.	Click the Global Attributes button [image].

2.	In the Global Attributes dialog box, type "{tag:font size=7 color=yellow}Corel CD Home Catalog{tag:/font}" in the Before First Record box.

3.	Click OK.


Setting up the output

In this procedure, you will specify the publishing procedure for the .HTML output file. Corel WEB.DATA allows you to simply process the output file or to process the output file and view it on the World Wide Web.

By default, Corel WEB.DATA assigns the database filename to the .HTML file. Because the sample files that you copied to your \DOCS folder already contain an .HTML file named CDHOME.HTM, you must change your file name to MYCDHOME.HTM.

To set up the output file

1.	Click the Output Setup button [image].

2.	Type C:\COREL\WEBMASTR\CWDATA\PROJECT\DOCS\MYCDHOME.HTM in the Output File box of the Output Setup dialog box.

3.	Click OK.


Saving your recipe

Before you process your recipe and view it on the World Wide Web, you must save the MYCDHOME.RCP file.

To save a recipe

•	Click File, Save.

 Tip

•	You can also click [image] to save your recipe.


Processing the recipe
Processing your recipe file

In this procedure, you will process the MYCDHOME.RCP recipe and view the .HTML output file on the World Wide Web. The Records bar in the Processing Output dialog box indicates the number of records being processed and the progress that Corel WEB.DATA has made.

To process a recipe

1.	Click the Process button [image].

2.	Click the Preview In Browser button in the Processing Output dialog box.

Corel WEB.DATA launches your Web browser and displays the output file processed by the recipe.

3.	Close your browser window to continue.

 Notes

•	If you click the View in Text Editor button in the Processing Output dialog box, Corel WEB.DATA opens the text file containing the HTML code for your document in the Windows WordPad Editor.

•	Although you can view and edit HTML code in the WordPad Editor, we do not recommend altering your document unless you have previous experience with the Hypertext Markup Language (HTML).


Your Web page should look like this:


Conclusion

You have now published a table-based catalog of information to the World Wide Web! At this point in your Corel WEB.DATA project, you have a recipe file specifying the data to be used in the CD Home catalog and the formatting codes that will organize and enhance the information. You have also created an .HTML file that contains all of the information that your Web browser requires to publish your Corel CD Home Catalog to the Web.

Advance to Lesson 3 and begin exploring Corel WEB.DATA's more sophisticated database publishing options.


Lesson 3 : Advanced catalog creation

In this advanced lesson, you will modify the basic CD Home catalog that you created in Lesson 2 by adding more sophisticated features to your publication. In the following procedures, you will open your basic CD Home catalog file, save it under a new name, and edit the information displayed in each dialog box. You will also view the output file, use the Dictionary Editor, and edit the options available in the Options dialog box. In Lesson 3 you will

•	add links to product-specific .HTML files

•	create a Substitution dictionary

•	merge your table with an existing HTML document

•	join two databases

•	divide your table into several areas and add headers to each area

•	add subtotal control blocks and document totals to each area


Contents

Imagine that in the second phase of your contract, you are responsible for adding a category selection feature to the CD Home titles catalog. Category selection allows users to view a limited number of CD titles by choosing from one of three categories: Kids Titles, Family Titles, and Adult Titles. To accomplish this task, you must complete the following procedures:

•	Viewing the target document

•	Viewing the format and content tags

•	Completing the HTML tags

•	Opening a recipe file

•	Joining two databases

•	Repositioning and adding fields

•	Adding headings

•	Customizing the heading field

•	Adding subtotals

•	Customizing the subtotals and the document total

•	Setting the field attributes for a hyperlink

•	Applying a substitution dictionary

•	Creating a Substitution dictionary

•	Sorting the table

•	Resetting global attributes

•	Setting up the output for your published recipe

•	Saving your recipe

•	Processing your recipe


Viewing the target document

In this lesson, you will modify a table and merge it with an existing .HTML file. The Web document that will be modified throughout Lesson 3 is called MAIN.HTM and is located in the DOCS folder in your install folder. The following three procedures explain each line in the MAIN.HTML file.

To view the MAIN.HTM file

1.	Locate MAIN.HTM in the DOCS folder of your Corel WEB.DATA install folder.

2.	Open MAIN.HTM in a text editor (e.g., WordPad or Notepad).

Your default text editor will  display the following HTML code:


Viewing the tags that define the content and format of the document

HTML (Hypertext Markup Language) is a coding language that tells browsers how to display information on the World Wide Web. HTML code is defined by a series of tags that determine the format and structure of the text and objects in your documents. Tags are enclosed in angle brackets (< and >), and usually appear in pairs. For example, to begin an .HTML file, you must include the opening <HTML> tag. But the .HTML file is not complete until the closing tag, </HTML> has been added to the end of the document.

The <HTML> tag is the first tag in a Web document. All of the information contained between the <HTML> and the </HTML>, tags has been formatted in HTML.

The <TITLE> and </TITLE> tags format the title of the document. The text contained between these tags appears in your Web browser's title bar and will be used as keywords or target strings for search engines on the World Wide Web.

The opening <BODY> tag marks the beginning of the document body where the Web page's content is defined. Any text that lies external to the <BODY> and </BODY> tags will not be displayed in your final Web document.

You can define a background color or image for your Web page using the Background attribute with the opening <BODY> tag. In the MAIN.HTM file, the background of the document is defined by the following syntax:

<BODY BACKGROUND="logotile.gif">


Completing the HTML tags

All of the text contained between the opening and closing CENTER tags, (<CENTER> and </CENTER>) will be aligned in the center of the page when displayed by a Web browser. This means that both the Web page's title, defined by the Heading 1 tags (<H1> and </H1>) and the hyperlinked text "Click here to visit Corel's home page" will be centered at the top of the corresponding Web page.

Hyperlinked text is tagged with the HREF attribute and the anchor tags (<A> and </A>). For example, the following syntax links standard text to Corel's home page at http://www.corel.com:

<A HREF=http://www.corel.com>Click here to visit Corel's home page!</A>

When a visitor accesses the MAIN.HTM file on the Web, "Click here to visit Corel's home page" will be colored, indicating that the text jumps to another HTML page or Web site.

The opening and closing Corel WEB.DATA tags (<CORELWEBDATA> and </CORELWEBDATA>) mark the location of the Corel WEB.DATA table, allowing the application to update the table's data each time the corresponding recipe is run.

The closing </HTML> tag marks the end of the document. To proceed with the creation of your advanced CD Home catalog, close your browser window.


Opening a recipe file

When you installed Corel WEB.DATA, a sample recipe for the revised CD Home catalog, named CDHOME1.RCP was copied to the Recipe folder in your install folder. CDHOME1.RCP provides you with a sample of the CD Home catalog recipe that you will create in this lesson.

When you create and save your new catalog recipe, you must choose a filename other than CDHOME.RCP and CDHOME1.RCP. If you specify CDHOME.RCP or CDHOME1.RCP as your catalog recipe name, you will overwrite the sample when you save your file. In this procedure, you will open the CDHOME.RCP.

To save the recipe file with a new name

1.	Click File, Open.

2.	Choose CDHOME.RCP and click Open.

3.	Click File, Save As.

4.	Locate the RECIPES subfolder in your Corel WEB.DATA install folder.

5.	Type "CD1" in the File Name box.

6.	Click Save.


Adding a second database and creating a join

In this procedure, you will add a second database to your recipe file and create a join that adds information to the file. When two or more databases are joined, Corel WEB.DATA does not create a new database file. Instead, the relationship between the joined tables creates an index, so that when a record is referenced in the main table, the equivalent record is automatically retrieved in the joined table. The additional database for this procedure is a Microsoft Access database.

To add a database

1.	Click the Select Database button [image].

2.	Click the Add Joins And Calculated Fields button in the Select Database dialog box.

3.	Click the Add New button in the Tables section of the Table Join dialog box.

4.	Choose MS Access (*.MDB) from the Files Of Type list box in the Select Database File dialog box.

5.	Select CDINFO.MDB.

6.	Click Open.

7.	Click OK in the Select Table dialog box.

To create a join

1.	Ensure that the Lookup button is enabled in the Join As section of the Table Join dialog box.

2.	Select t0.LOGO in the Fields Joined To window.

3.	Select LOGO in the Lookup Fields window.

4.	Click the Create Join button.

5.	Click the Display button in the Views section of the Select Database dialog box.

6.	Click the Close All button [image] in the Table View window.

7.	Click OK.

Corel WEB.DATA returns to the Select Database dialog box.

8.	Click OK.

 Note

•	Corel WEB.DATA adds the prefix t0 to each field and the prefix tn (where n is an integer from 0 to 64) to each table and its fields. In this way, Corel WEB.DATA labels the main table with the prefix t0, the first joined table with the prefix t1, and so on. All field names contain the prefix that identifies their source tables.


The Table Join dialog box should look like this:


Repositioning and adding fields

Because you will be adding links from each product name to its corresponding .HTML file, you must add and reposition the fields that you've assigned to the document body control block. In this procedure, you will paste the t0.LOGO field above the t0.PRODUCT field in the Field Selection dialog box.

To select fields

1.	Click the Field Selection button [image].

2.	Ensure that Document Body is selected in the Field Selection dialog box.

3.	Ensure that the second t0.LOGO field is selected in the Selected window.

4.	Right-click and click Copy

5.	Select t0.PRODUCT from the Selected window.

6.	Right-click and click Paste Above.

Corel WEB.DATA inserts the t0.LOGO field before the t0.PRODUCT field in the Selected window.


The Field Selection dialog box should look like this:


Adding headings

Your completed Web document will display a table of CD Home titles sorted according to audience category. The table will be divided into three sections: Kids Titles, Family Titles, and Adult Titles. In this procedure, you will create a heading for each of the three table sections.

To complete this procedure, you must have the Field Selection dialog box open.

To add a heading

1.	Click the Insert Above button in the Heading Blocks section.

2.	Choose t1.AUDIENCE from the Available window.

3.	Click the Add Field(s) button.

4.	Ensure that the On button is enabled in the Control section.

Turning the Control value On instructs Corel WEB.DATA to alter the file output when a value in the selected field is modified. If you turn Control Off, the file output will not reflect the changes that occur in the selected field. The Control feature applies only to the heading control blocks of your Web documents.

5.	Enable the Outside Table check box in the Heading Blocks section to set the heading block control outside the table.

6.	Click OK.


The Field Selection dialog box should look like this:


Customizing the heading field

To customize your document, you can assign attributes to the heading control block that you created in the Field Selection dialog box. In this procedure, you will format the fields assigned to the heading control block with a heading 2 style and horizontal rule.

To customize the heading field

1.	Click the Field Attributes button [image].

2.	Choose h1:Heading from the list box in the Fields dialog box.

3.	Type "{tag:P}{tag:HR}{tag:P}{tag:H2}" in the Text Before box.

4.	Type "{tag:/H2}" in the Text After box.

5.	Click OK.


The Field Attributes dialog box should look like this:


Adding subtotals

You can define subtotal control blocks for each heading control block specified in your recipe. Once you create a subtotal control block, you must select fields and apply functions to create output values. A heading's subtotal is calculated according to the values of the selected subtotal field(s) in the heading control block. In this procedure you will view the overall total and the subtotals to see the number of CDs that Corel offers to each audience category.

To add a subtotal to the Heading Level 1 control block

1.	Click the Field Selection button [image].

2.	Select Heading Level 1 in the Field Selection dialog box.

3.	Click Add in the Sub-Total Blocks section.

4.	Choose t0.PRODUCT from the Available window.

5.	Click the Add Field(s) button.

6.	Choose Count from the Function list box.

To add a subtotal to the Document Control block

1.	Select Document Control.

2.	Click the Add button in the Sub-Total Blocks section.

3.	Ensure that Document Totals is selected.

4.	Choose Count from the Function list box.

5.	Choose t0.PRODUCT from the Available window.

6.	Click the Add Field(s) button.

7.	Click OK.


The Field Selection dialog box should look like this:


Customizing the subtotals and document total
Customizing the subtotals and the document total

Document totals are published once at the end of the document. You can select any field for the document total, whether or not it has been selected in another control block. A document total contains the expression calculated from the values of fields present in the database table. In this procedure, you will insert meaningful text before the subtotal and document total output.

To add text before the subtotal and document total output

1.	Click the Field Attributes button [image].

2.	Choose S1: Subtotals from the list box in the Fields dialog box.

3.	Type "Number of titles for this category:" and press SPACEBAR in the Text Before box.

4.	Choose Document Totals from the list box in the Fields dialog box.

5.	Type "{tag:br}Total number of titles listed on this page:" and press SPACEBAR in the Text Before box.


Setting the field attributes for a hyperlink

In this procedure, you will add a hyperlink to your CD1.RCP file. To create a hyperlink, you must tag the first t0.LOGO field, indicating to your Web browser that the t0.LOGO file links to another file. The t0.LOGO field will reference a hyperlink that jumps to the product-specific HTML document. You can add text that will appear before and/or after each of the t0.LOGO fields by typing the text and HTML markup tags in the Text Before and Text After boxes.

To complete this procedure, you must have the Field Attributes dialog box open. If you closed the Field Attributes dialog box in the previous procedure, click the Field Attributes button to re-open this dialog box.

To set field attributes

1.	Choose Document Body from the list box in the Fields dialog box.

2.	Ensure that the first t0.LOGO is selected in the list of the Fields dialog box.

3.	Type "A HREF" in the Tag box.

4.	Type ".HTM" in the Text After box.

5.	Choose Text from the Change Field Type To list box.


The Field Attributes dialog box should look like this:


Applying a Substitution dictionary

To create an advanced CD Home catalog for the World Wide Web, you must design a dictionary that associates the codes for the t1.AUDIENCE field with meaningful text. In this procedure, you will associate the numbers 1, 2, and 3 with Kids Titles, Family Titles, and Adult Titles respectively. Then, you will apply the (AUD.DIX) dictionary to the t1.AUDIENCE field.

To complete this procedure, you must have the Field Attributes dialog box open. If you closed the Field Attributes dialog box in the previous procedure, click the Field Attributes button to re-open this dialog box.

To apply a dictionary

1.	Click the Dictionaries tab in the Field Attributes dialog box.

2.	Choose h1:Heading from the list box in the Fields dialog box.

3.	Choose t1.AUDIENCE from the list in the Fields dialog box.

4.	Choose AUDIENCE.DIX from the Field Substitution dictionary list box.

If you created your own Event dictionary, then choose MYAUD.DIX.

5.	Click OK.

 Note

•	The sorting dictionary AUD.DIX was copied to your Corel WEB.DATA install folder; however, to create this dictionary on your own, move to the next procedure.


The Dictionaries tab should look like this:


Creating a Substitution dictionary

The AUD.DIX substitution dictionary has been provided for you as an example of how your dictionary will look once you have completed this procedure. When you save the new dictionary file, you must choose a filename other than AUD.DIX to avoid overwriting the sample file.

To create a dictionary

1.	Click Tools, Dictionary Editor.

2.	Click File, New in the Dictionary Editor window.

3.	Click OK in the New Dictionary Type dialog box.

To enter the Kids Title

1.	Type 1 in the text cell on the Dictionary Editor toolbar.

2.	Click the Accept Modifications button [image].

3.	Select the first right Text Term cell.

4.	Type "Kids Titles".

To enter the Family Title

1.	Select the second left Text Term cell.

2.	Type 2 in the text cell on the Dictionary Editor toolbar.

3.	Select the second right Text Term cell.

4.	Type "Family Titles".

To enter the Adult Title

1.	Select the third left Text Term cell.

2.	Type 3 in the text cell on the Dictionary Editor toolbar.

3.	Select the third right Text Term cell.

4.	Type "Adult Titles".

5.	Click the Accept Modifications button [image].

To save the dictionary

1.	Click File, Save As.

2.	Type "MYAUD" in the File Name box of the Save As dialog box.

3.	Click Save.

4.	Close the Dictionary Editor window.


The Dictionary Editor should look like this:


Sorting the table

In this procedure, you will sort your table into headings specified by the t1.AUDIENCE field. The t1.AUDIENCE field must be identified as the sort field.

To sort the table

1.	Click the Record Sorting button [image].

2.	Choose t1.AUDIENCE from the Available Fields window.

3.	Click the Add Field button.

4.	Ensure that Ascending is selected as the default Sort Order.

5.	Click OK.


Resetting the global attributes

By setting the global attributes of your document, you can insert text, numerical data, symbols, graphics, macro functions, and format codes using the keyboard and HTML keypad. Global attributes can be added before the first record, between each record, after the last record, and in place of empty or null records. In this procedure, you will reset the global attributes that have been applied to your CD1.RCP file from the existing output file.

To reset the global attributes

1.	Click the Global Attributes button [image].

2.	Ensure that the text displayed in the Before First Record box is selected.

3.	Press DELETE.

4.	Click OK.


Setting up the output

In this procedure, you will instruct Corel WEB.DATA to add the table that you've created to the MAIN.HTM file. The output file defaults to the CDHOME.HTM file that you created in Lesson 2. To avoid this, you must change the file path and name by browsing for the MAIN.HTM file in the DOCS folder in your Corel WEB.DATA install folder.

To set up the output file

1.	Click the Output Setup button [image].

2.	Click the Browse button in the Output Setup dialog box.

3.	Choose MAIN.HTM from the DOCS subfolder in your Corel WEB.DATA install folder.

4.	Click Save.

Corel WEB.DATA prompts you to replace the existing file.

5.	Click Yes.

6.	Enable the Merge Contents With Output File check box.

7.	Click OK.


Saving your recipe

Before you process your recipe and view it on the World Wide Web, you must save the CD1.RCP file.

To save a recipe

•	Click File, Save.

Tip

•	You can also click [image] to save your recipe.


Processing the recipe

In this procedure, you will process and publish the CD1.RCP file. The Records bar in the Processing Output dialog box indicates the number of records that have been processed and the progress that Corel WEB.DATA has made. When the output file is complete, the CD Home table is inserted in the MAIN.HTM file.

To process a file

1.	Click the Process button [image].

2.	In the Processing Options dialog box, click the Preview in browser button.

Corel WEB.DATA opens your new HTML document in your default Web browser window.

 Notes

•	If you click the Display button in the Processing Output dialog box, Corel WEB.DATA opens the text file containing the HTML code for your document in the Windows WordPad Editor.

•	Although you can view and edit HTML code in the WordPad editor, we do not recommend altering your document unless you have previous experience with the Hypertext Markup Language (HTML).


The CD Home table should look like this:


Conclusion

Congratulations! You have successfully completed the Corel WEB.DATA tutorial and have mastered some of the application's essential features. Continue to explore Corel WEB.DATA's more advanced publishing features on your own and learn to create high-quality, professional documents for the World Wide Web.

Because many of the procedures illustrated throughout its lessons can be applied to multiple projects, the Corel WEB.DATA tutorial makes an excellent online reference for your future database publishing operations.

Visit Corel's Web Site

For additional product information, updates, and sample recipes, visit Corel's Web site at http://www.corel.com/webdata/index.htm.